import {get, post} from '@/utils/request'

/*
* 柜机条件分页展示
* */
export const getList = (data) => {
  return post('/machine/machine/list', data)
}
/*
* 开箱记录条件分页展示
* */
export const findBoxRecordList = (data) => {
  return post('/machine/machine/findBoxRecordList', data)
}
/*
* 箱格条件展示
* */
export const getBoxList = (data) => {
  return post('/machine/machine/getBoxList', data)
}
/*
  * 修改柜机状态
  * */
export const updateStatus = (data) => {
  return post('/machine/machine/updateStatus', data)
}
/*
  * 修改箱格信息
  * */
export const updateBox = (data) => {
  return post('/machine/machine/updateBox', data)
}
/*
  * 柜机添加
  * */
export const addMachine = (data) => {
  return post('/machine/machine/addMachine', data)
}

/*
* 柜机批量添加
* */
export const save = (data) => {
  return post('/machine/machine/save', data)
}
/*
* 根据id查找柜机详细信息
* */
export const findMachineById = (id) => {
  return get('/machine/machine/findMachineById/' + id , {})
}
/*
* 根据id查找箱格详细信息
* */
export const findBoxById = (id) => {
  return get('/machine/machine/findBoxById/' + id , {})
}

export function getNewOpenNum(){
  return get('/machine/machine/getNewOpenNum',{})
}

export function getMapChart(){
  return get('/machine/machine/getMapChart',{})
}